home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / misc / ifthen-addi.sty < prev    next >
Text File  |  1993-01-11  |  817b  |  23 lines

  1. %
  2. % small extension for ifthen style -- TeX \newif's
  3. %
  4. % e.g., \ifthen{\boolean{@twoside}}{}{}
  5. \def\boolean#1{1=1\fi\noexpand\csname if#1\endcsname\def\noexpand\@tempa{1=1}%
  6. \else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
  7. %
  8. %
  9. %
  10. %  \ifthenelse{\dimenequal{10pt}{20pt}}{}{}   like #1 = #2
  11. %  \ifthenelse{\dimenless{10pt}{20pt}}{}{}    like #1 < #2
  12. %  \ifthenelse{\dimengreater{10pt}{20pt}}{}{} like #1 > #2
  13. %
  14. \def\dimenequal#1#2{1=1\fi\noexpand\ifdim #1=#2 \def\noexpand\@tempa{1=1}
  15. \else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
  16. %
  17. \def\dimenless#1#2{1=1\fi\noexpand\ifdim #1<#2 \def\noexpand\@tempa{1=1}
  18. \else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
  19. %
  20. \def\dimengreater#1#2{1=1\fi\noexpand\ifdim #1>#2 \def\noexpand\@tempa{1=1}
  21. \else\def\noexpand\@tempa{1=0}\fi\ifnum\noexpand\@tempa}
  22.